﻿using sixgod.Common.Model;
using sixgod.Dtos.WorkFlow.Search;
using sixgod.Dtos.WorkFlow;
using SqlSugar;
using sixgod.Dtos.WorkFlow.Query;
using sixgod.Model.WorkFlow;

namespace sixgod.Service.WorkFlow;

public interface IWorkFlowService:ISimpleClient<Model.WorkFlow.WorkFlow>
{
    /// <summary>
    /// 分页数据
    /// </summary>
    /// <param name="query"></param>
    /// <returns></returns>
    Task<PageResponseResult<WorkFlowDto>> GetPageList(WorkFlowQuery query);

    /// <summary>
    /// 开始发起流程
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    Task StartWorkFlow(StartWorkFlowInDto data);

    /// <summary>
    /// 获取流程详细
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<WorkFlowDetailDto> GetWorkFlowDetailDto(string id);

    /// <summary>
    /// 审核流程
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    Task AuditFlow(FlowExecuteInDto data);

    /// <summary>
    /// 根据ID获取表单元素
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<List<FormItem>> GetFormItems(string id);

    /// <summary>
    /// 编辑，重新开始流程
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    Task ReStartWorkFlow(StartWorkFlowInDto data);
}